From ca3ab005c14186c4b319a0995f25a0cab1092835 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 18 May 2010 13:30:45 +0100 Subject: [PATCH] x86-hpet: fix booting NULL pointer panic introduced by c/s 21398. (XEN) Xen call trace: (XEN) [] check_lock+0x19/0x49 (XEN) [] _spin_lock_irq+0x28/0x4a (XEN) [] hpet_broadcast_exit+0x92/0x1f0 (XEN) [] acpi_processor_idle+0x62c/0x6e6 (XEN) [] idle_loop+0x62/0x73 Signed-off-by: Wei Gang --- xen/arch/x86/hpet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index 556368632a..e67e5ce5d3 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -684,6 +684,9 @@ void hpet_broadcast_exit(void) if ( this_cpu(timer_deadline_start) == 0 ) return; + if ( !ch ) + ch = hpet_get_channel(cpu); + /* Reprogram the deadline; trigger timer work now if it has passed. */ enable_APIC_timer(); if ( !reprogram_timer(this_cpu(timer_deadline_start)) ) -- 2.30.2